package com.bilibili.netty.im.handler;

import com.bilibili.netty.im.domain.CommandPO;
import com.bilibili.netty.im.domain.Result;
import com.bilibili.netty.im.server.IMServer;
import io.netty.channel.ChannelHandlerContext;

/**
 * @program: rgs-study0project
 * @description:
 * @author: Mr.Ren
 * @create: 2023-10-30 23:12
 **/
public class MyConnectHandler {

    public static void execute(ChannelHandlerContext ctx, CommandPO commandPO) {

        IMServer.USER.put(commandPO.getNickname(),ctx.channel());
        ctx.channel().writeAndFlush(Result.success("系统消息：服务端建立连接成功"));
    }
}
